<template>
  <el-row
    :gutter="0"
    style="margin-left: 0px; margin-right: 0px"
  >
    <el-col :span="24">
      <table-view
        :data="datas.distributeContractDetails"
        header-cell-class-name="table-header"
        class="tableForm"
        size="mini"
        border
      >
        <el-table-column
          type="index"
          label="序号"
          width="50"
          align="center"
        />
        <el-table-column
          label="配送模式"
          align="center"
        >
          <template #default="{row}">
            {{ getLabel('distributor_mode', row.rddType) }}
          </template>
        </el-table-column>
        <el-table-column
          label="配送商"
          prop="distributeName"
          align="center"
        />
        <el-table-column
          label="配送费"
          prop="distributePrice"
          align="center"
        >
          <template #default="scope">
            <div v-if="scope.row.rddType==='2'">
              <div v-if="scope.row.computeMode==='固定价格'">
                <span>{{ scope.row.distributePrice }}元</span>
                <span v-if="datas.productInfoDetail?.sellUnit">/{{ getLabel('sell_unit',datas.productInfoDetail?.sellUnit) }}</span>
              </div>
              <div v-if="scope.row.computeMode==='终端价百分比'">
                <span>{{ scope.row.distributePrice }}%</span>
                <span>终端价</span>
              </div>
            </div>
            <div v-else>无</div>
          </template>
        </el-table-column>
        <el-table-column
          label="配送服务编号"
          prop="distributeServeNo"
          align="center"
        >
          <template #default="scope">
            <span>{{ scope.row.distributeServeNo||'无' }}</span>
          </template>
        </el-table-column>
      </table-view>
    </el-col>
  </el-row>
</template>

<script>
import {toRefs} from 'vue'

export default {
  components: {},
  props: {
    datas: {
      type: Object,
      default: () => {},
    },
  },
  setup(props, context) {
    return {
      ...toRefs(props),
    }
  },
}
</script>

<style>
</style>
